home *** CD-ROM | disk | FTP | other *** search
- unit EditAssoc;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls;
-
- type
- TEditAssociation = class(TForm)
- OKButton: TButton;
- CancelButton: TButton;
- Extension: TLabel;
- AssocPath: TEdit;
- Label1: TLabel;
- BrowseButton: TButton;
- Bevel1: TBevel;
- OpenDialog1: TOpenDialog;
- procedure BrowseButtonClick(Sender: TObject);
- procedure OKButtonClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- procedure TEditAssociation.BrowseButtonClick(Sender: TObject);
- begin
- if OpenDialog1.Execute then
- AssocPath.Text := OpenDialog1.FileName;
- end;
-
- procedure TEditAssociation.OKButtonClick(Sender: TObject);
- begin
- if AssocPath.Text = '' then
- ShowMessage ('You must specify the pathname of an associated program')
- else
- ModalResult := mrOK;
- end;
-
- end.
-